#   -*- mode: makefile; coding: utf-8; -*-
#
#   Copyright 2008 Asier Aguirre <asier.aguirre@gmail.com>
#   This file is part of Intromit.
#
#   Intromit is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   Intromit is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Intromit.  If not, see <http://www.gnu.org/licenses/>.

LIBTOOL = @LIBTOOL@

nobase_lib_LTLIBRARIES = intromit/backends/libpyintromit_embed.la

intromit_backends_libpyintromit_embed_la_LDFLAGS= \
	-ldl -lstdc++ $(PYTHON_LDADD) -lreadline
intromit_backends_libpyintromit_embed_la_LIBADD = \
	../../util/util.lo ../../util/string.lo \
	../../util/marshalling.lo ../../util/file_mng.lo \
	../../generators/gendata/gendata_common.lo \
	../python/pymetadata.lo ../python/pymetadata_container.lo \
	../python/pymetadata_global.lo ../python/pymetadata_iface.lo \
	../python/pymetadata_gc.lo ../python/pymetadata_vector.lo
intromit_backends_libpyintromit_embed_la_SOURCES= \
	pyintromit_embed.cc pyintromit_embed.hh readcommand.cc readcommand.hh

INCLUDES = -I../../util -I../../generators/gendata $(PYTHON_INCLUDES)

nobase_include_HEADERS = intromit/pyembed.h intromit/pyembed.hh

EXTRA_DIST = pyintromit_embed.py

MAINTAINERCLEANFILES = Makefile.in

INSTALL_MODULES = pyintromit_embed.py

clean-local:
	rm -rf *~ *.da *.la *.pyc intromit/*~ intromit/backends

install-exec-local:
	mkdir -p $(prefix)/lib/intromit/backends
	for f in $(INSTALL_MODULES); do \
		cp -rf $$f $(prefix)/lib/intromit/backends/; \
	done
